package cn.iune.erp.inventory;

import java.math.BigDecimal;
import java.sql.Date;
import java.util.Map;

import com.alibaba.fastjson.JSONObject;
import com.itextpdf.text.Document;

public interface IInventoryService {


	//撤回出入库单
	Map<String, Object> storageRecordActive(String rowID, String cUsercode, String cUsername, String userId,
			String employeeNo, String employeeName);

	//反审核出入库单
	Map<String, Object> storageRecordUnAgree(String rowID, String cUsercode, String cUsername, String userId,
			String employeeNo, String employeeName);

	//关闭出入库单
	Map<String, Object> storageRecordClose(String rowID, String cUsercode, String cUsername, String userId,
			String employeeNo, String employeeName);

	//打开出入库单
	Map<String, Object> storageRecordOpen(String rowID, String cUsercode, String cUsername, String userId,
			String employeeNo, String employeeName);



	//MRP计算
	//计算原则：
	//1、选择的仓库是要求参加MRP运算
	//2、安全库存量（最小库存量）为0不参加计算
	//3、按单一工厂计算
	//4、返回table

	//获取库存数量（盘点用）
	Map<String, Object> getCheckQuantity(String storageID, String itemID,String itemProperty, String batchNo, String storeNo,
			String enterpriseNo);

	JSONObject responseJSON(String flag, String code, String message);


	void invQTRKPrintPDF(String fID, Document doc) throws Exception;

	void invDBDJPrintPDF(String fID, Document doc) throws Exception;

	void invPDDJPrintPDF(String fID, Document doc) throws Exception;

	Map<String, Object> storageRecordAgreeIt(String rowID, String cUsercode, String cUsername, String userId,
			String employeeNo, String employeeName);

	Map<String, Object> storageRecordConfirm(String rowID, String cUsercode, String cUsername, String userId,
			String employeeNo, String employeeName);

	int updateDevolveCause(JSONObject params);

	void afterInsert(StorageRecordDetail obj);

	int updateMaterialType(JSONObject params);

	Map<String, Object> getBatchNoInfo(String itemID, String batchNo, String enterpriseNo);


	StorageRecord getByID(String fID);

	StorageRecord storageRecordBACKInsert(StorageRecord storageSource, String cUsercode, String cUsername,
			String userId, String autoState, int flowType, String autoPayment, String employeeNo, String employeeName);


	void beforeDelete(String fID);

	Map<String, Object> stocktakingConfirm(String fID);

	Map<String, Object> stocktakingActive(String fID);

	Map<String, Object> stocktakingAgreeIt(String fID, String usercode, String username, String userId);

	Map<String, Object> stocktakingUnAgree(String fID);

	Map<String, Object> stocktakingClose(String fID);

	Map<String, Object> stocktakingOpen(String fID);

	JSONObject stocktakingGenerate(String documentNo, int method, String cUsercode, String cUsername, String userId,
			String enterpriseNo, String enterpriseName);

	Map<String, Object> storageLedgerConfirm(String rowID, String cUsercode, String cUsername, String userId,
			String employeeNo, String employeeName);

	Map<String, Object> storageLedgerActive(String rowID);

	Map<String, Object> storageLedgerAgreeIt(String rowID, String cUsercode, String cUsername, String userId,
			String employeeNo, String employeeName);

	Map<String, Object> storageLedgerUnAgree(String rowID, String cUsercode, String cUsername, String userId,
			String employeeNo, String employeeName);

	Map<String, Object> storageLedgerClose(String rowID);

	Map<String, Object> storageLedgerOpen(String rowID);

	int postingExt(String recordNo, String serialNo, String fMasterID, String systemCode, String billType,
			String billTypeName, String revOpay, String costingCode, int dealType, Date orderDate, String storageTypeD,
			String storageTypeDLabel, String providerID, String providerNo, String shortName, String providerName,
			String storageType, String storageTypeLabel, String storageID, String storageNo, String storageName,
			String floorNo, String itemID, String itemNo, String itemName, String itemProperty, String unitCode,
			String unitName, int validDays, int checkoutAgainDays, BigDecimal itemQuantity, BigDecimal pieceQuantity,
			BigDecimal materialAmountPer, BigDecimal workingAmountPer, BigDecimal manufactAmountPer,
			BigDecimal processAmountPer, BigDecimal costingAmountPer, BigDecimal materialAmount,
			BigDecimal workingAmount, BigDecimal manufactAmount, BigDecimal processAmount, BigDecimal costingAmount,
			String batchNo, String batchDescribe, Date produceDate, Date validDate, Date checkoutAgainDate,
			String storeNo, String projectNo, String workNo, int frozenFlag, String userId, String enterpriseNo,
			String enterpriseName);

	int unpostingExt(String recordNo, String serialNo, String revOpay, String userId, String enterpriseNo);







}